//
//  ZYXTestViewController.m
//  OCUIAdvanced
//  Test
//

#import "ZYXTestViewController.h"

@interface ZYXTestViewController ()
- (IBAction)changeAppNum;
@end

@implementation ZYXTestViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    int age = 10;
    double height = 1.55;
    
    NSLog(@"----viewDidLoad-age=%d, height=%f", age, height);
    // ----viewDidLoad-age=10, height=1.550000
    /**
     1.调试阶段:写代码,调错误(肯定需要打印)   系统会自动定义一个叫做DEBUG的宏
     
     2.发布阶段:写好的代码生成ipa等压缩包文件,上传到appstore,安装到用户的设备上(不需要打印)  系统会删掉叫做DEBUG的宏
     */
    
    ZYXLog(@"5345345 -  %d- %d", 10, 20); // 5345345 -  10- 20
    ZYXLog(@"5345345 -  ");               // 5345345 -
    ZYXLog(@"5345345 -  ");               // 5345345 -

}

- (void)didReceiveMemoryWarning
{
    ZYXLog(@"---dasdfasf");
    [super didReceiveMemoryWarning];
}

- (IBAction)changeAppNum
{
    ZYXLog(@"changeAppNum");
    
    UIApplication *app = [UIApplication sharedApplication];
    
    //[app setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
    //    app.statusBarHidden = YES;
    //app.statusBarHidden = NO;
    
    //    app.statusBarStyle = UIStatusBarStyleLightContent;
    //[app setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
    
    
    // 0代表清除图标右上角的数字
    //    app.applicationIconBadgeNumber = 0;
    //app.applicationIconBadgeNumber = 10;
    //Attempting to badge the application icon but haven't received permission from the user to badge the application
    
    
    
    // 设置显示联网状态
    app.networkActivityIndicatorVisible = YES;
    
    // URL : 一个资源的唯一路径
    
    // URL的组成 == 协议头://主机域名/路径
    
    // 网络资源URL的组成 == http://www.baidu.com/1.png
    
    // 本地文件资源URL的组成 == file:///Users/apple/Desktop/1.png
    
    [app openURL:[NSURL URLWithString:@"http://ios.itcast.cn"]];
    
    // 打电话
    //    [app openURL:[NSURL URLWithString:@"tel://10086"]];
}


- (BOOL)prefersStatusBarHidden
{
    return NO;
}



- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}



@end
